package com.cupdata.zicon.singleton;

import org.junit.Test;

/**
 * 单例模式测试方法
 */
public class SingleTest {

    @Test
    public void SingleTest01(){
        try {
            Class.forName("com.cupdata.zicon.singleton.LazySingleton");
            Class.forName("com.cupdata.zicon.singleton.EagerSingleton");
            Class.forName("com.cupdata.zicon.singleton.IoDHSingleton");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
    @Test
    public void SingleTest02(){
        EagerSingleton eagerSingleton = EagerSingleton.getInstance();
        LazySingleton lazySingleton = LazySingleton.getInstance();
        IoDHSingleton ioDHSingleton = IoDHSingleton.getInstance();
    }
}
